#ifndef DOCUMENT_H
#define DOCUMENT_H

#include <iostream>

#include "document_exceptions.h"
#include "file_io_exceptions.h"
#include "date_exceptions.h"
#include "date.h"

///header file for base class Document

class Document
{
	public:
		enum Document_types
		{
			ORDER,///0
			BILL,///1
			CLAIM,///2
			TENDER///3
		};
		
	protected:
		int type;
		int issue_no;
		Date date;
		std::string subject;
		std::string partner;
		int ref_no;

		virtual Date get_date() const throw();

		virtual std::string get_subject() const throw();


		virtual void set_type(const int &p_type) throw();

		virtual void set_issue_no(const int &p_issue_no) throw();

		virtual void set_date(const Date &p_date) throw();

		virtual void set_subject(const std::string &p_subject) throw();

		virtual void set_partner(const std::string &p_partner) throw();

		virtual void set_ref_no(const int &p_ref_no) throw();
	
	public:
		Document() throw();

		virtual ~Document() throw();
		
		virtual std::string get_partner() const throw();

		virtual int get_type() const throw();

		virtual int get_issue_no() const throw();

		virtual int get_ref_no() const throw();

		static std::string document_type_name(const int p_type) throw();

		virtual void fill_in_document_data(std::istream &p_in_stream) throw(File_IO_exceptions, Document_exceptions, Date_exceptions);
		///different input procedure when reading from std::cin or from something else
		
		virtual int print_out_document_data(std::ostream &p_out_stream) throw(Date_exceptions, Document_exceptions);
		///different output procedure when writing to std::cout or to something else
		
};

#endif
